package com.yunhe.inter;

import java.util.ArrayList;

import org.apache.ibatis.annotations.Param;

import com.yunhe.bean.ShoppingCarInfo;

public interface ShoppingCarInfoInter {
	//添加
/*	public void addShoppingInfo(@Param("commodityID") Integer commodityID ,@Param("quantityPurchased")Integer quantityPurchased);
*/	
	
	public void addShoppingInfo(@Param("commodityID")Integer commodityID ,@Param("quantityPurchased")Integer quantityPurchased,@Param("userID")Integer userID);

	
	//查看对应购物车中的信息
	public ShoppingCarInfo findShoppingInfo(Integer commodityID);
	//查看全部购物车中的信息
	public ArrayList <ShoppingCarInfo>findShoppingInfos();
	
	//判断购物车信息是否有对应id如何有则更新数量，如果没有新增
	public ShoppingCarInfo findShoppingisExist(Integer commodityID);
	
	//更新购买数量
	
	public void updateShoppingInfo(@Param("commodityID")Integer commodityID,@Param("quantityPurchased")Integer quantityPurchased);

	//删除购物车中的信息
	
	public void delShoppingInfo(Integer commodityID);
}
